class ServiceResult:
    def __init__(self, success_flag=False, error_message="", results=None):
        if results is None:
            results = []
        self.success_flag = success_flag
        self.error_message = error_message
        self.results = results

    def set_error_message(self, error_message):
        self.success_flag = False
        self.error_message = error_message
        self.results = None

    def set_success_message(self, image_class):
        self.success_flag = True
        self.error_message = ""
        self.results = image_class
